<template>
  <div class="crumbs">
    <a-breadcrumb v-if="routerList">
      <template v-for="(value, index) in routerList" :key="index">
        <a-breadcrumb-item class="crumbs-bom" @click="routerGo(value.name)">{{ value.title }}</a-breadcrumb-item>
      </template>
    </a-breadcrumb>
  </div>
</template>

<script lang="ts">
import { toRefs } from 'vue';
import importComfig from './crumbs';
export default {
  setup() {
    const { base, init, routerGo } = importComfig();
    init();
    return {
      ...toRefs(base),
      routerGo,
    };
  },
};
</script>

<style lang="less" scoped>
.crumbs {
  width: 100%;
  &-bom {
    cursor: pointer;
  }
}
</style>
